home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / libelf / elf_getscn.z / elf_getscn
Encoding:
Text File  |  1998-10-30  |  8.1 KB  |  131 lines

  1.  
  2.  
  3.  
  4. EEEELLLLFFFF____GGGGEEEETTTTSSSSCCCCNNNN((((3333EEEE))))                                                  EEEELLLLFFFF____GGGGEEEETTTTSSSSCCCCNNNN((((3333EEEE))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _eeee_llll_ffff______gggg_eeee_tttt_ssss_cccc_nnnn, _eeee_llll_ffff______nnnn_dddd_xxxx_ssss_cccc_nnnn, _eeee_llll_ffff______nnnn_eeee_wwww_ssss_cccc_nnnn, _eeee_llll_ffff______nnnn_eeee_xxxx_tttt_ssss_cccc_nnnn - get section information
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _cccc_cccc [_f_l_a_g ...] _f_i_l_e ...  _----_llll_eeee_llll_ffff [_l_i_b_r_a_r_y ...]
  13.  
  14.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_llll_iiii_bbbb_eeee_llll_ffff_...._hhhh_>>>>
  15.      _EEEE_llll_ffff______SSSS_cccc_nnnn _****_eeee_llll_ffff______gggg_eeee_tttt_ssss_cccc_nnnn_((((_EEEE_llll_ffff _****_eeee_llll_ffff_,,,, _ssss_iiii_zzzz_eeee______tttt _iiii_nnnn_dddd_eeee_xxxx_))))_;;;;
  16.      _ssss_iiii_zzzz_eeee______tttt _eeee_llll_ffff______nnnn_dddd_xxxx_ssss_cccc_nnnn_((((_EEEE_llll_ffff______SSSS_cccc_nnnn _****_ssss_cccc_nnnn_))))_;;;;
  17.      _EEEE_llll_ffff______SSSS_cccc_nnnn _****_eeee_llll_ffff______nnnn_eeee_wwww_ssss_cccc_nnnn_((((_EEEE_llll_ffff _****_eeee_llll_ffff_))))_;;;;
  18.      _EEEE_llll_ffff______SSSS_cccc_nnnn _****_eeee_llll_ffff______nnnn_eeee_xxxx_tttt_ssss_cccc_nnnn_((((_EEEE_llll_ffff _****_eeee_llll_ffff_,,,, _EEEE_llll_ffff______SSSS_cccc_nnnn _****_ssss_cccc_nnnn_))))_;;;;
  19.  
  20. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  21.      These functions provide indexed and sequential access to the sections
  22.      associated with the ELF descriptor _e_l_f.  If the program is building a new
  23.      file, it is responsible for creating the file's ELF header before
  24.      creating sections; see _eeee_llll_ffff______gggg_eeee_tttt_eeee_hhhh_dddd_rrrr(3E).
  25.  
  26.      _eeee_llll_ffff______gggg_eeee_tttt_ssss_cccc_nnnn returns a section descriptor, given an _i_n_d_e_x into the file's
  27.      section header table.  Note the first ``real'' section has index 1.
  28.      Although a program can get a section descriptor for the section whose
  29.      _i_n_d_e_x is 0 (_SSSS_HHHH_NNNN______UUUU_NNNN_DDDD_EEEE_FFFF, the undefined section), the section has no data
  30.      and the section header is ``empty'' (though present).  If the specified
  31.      section does not exist, an error occurs, or _e_l_f is null, _eeee_llll_ffff______gggg_eeee_tttt_ssss_cccc_nnnn
  32.      returns a null pointer.
  33.  
  34.      _eeee_llll_ffff______nnnn_eeee_wwww_ssss_cccc_nnnn creates a new section and appends it to the list for _e_l_f.
  35.      Because the _SSSS_HHHH_NNNN______UUUU_NNNN_DDDD_EEEE_FFFF section is required and not ``interesting'' to
  36.      applications, the library creates it automatically.  Thus the first call
  37.      to _eeee_llll_ffff______nnnn_eeee_wwww_ssss_cccc_nnnn for an ELF descriptor with no existing sections returns a
  38.      descriptor for section 1.  If an error occurs or _e_l_f is null, _eeee_llll_ffff______nnnn_eeee_wwww_ssss_cccc_nnnn
  39.      returns a null pointer.
  40.  
  41.      After creating a new section descriptor, the program can use _eeee_llll_ffff______gggg_eeee_tttt_ssss_hhhh_dddd_rrrr
  42.      to retrieve the newly created, ``clean'' section header.  The new section
  43.      descriptor will have no associated data [see _eeee_llll_ffff______gggg_eeee_tttt_dddd_aaaa_tttt_aaaa(3E)].  When
  44.      creating a new section in this way, the library updates the _eeee______ssss_hhhh_nnnn_uuuu_mmmm
  45.      member of the ELF header and sets the _EEEE_LLLL_FFFF______FFFF______DDDD_IIII_RRRR_TTTT_YYYY bit for the section
  46.      [see _eeee_llll_ffff______ffff_llll_aaaa_gggg(3E)].  If the program is building a new file, it is
  47.      responsible for creating the file's ELF header [see _eeee_llll_ffff______gggg_eeee_tttt_eeee_hhhh_dddd_rrrr(3E)]
  48.      before creating new sections.
  49.  
  50.      _eeee_llll_ffff______nnnn_eeee_xxxx_tttt_ssss_cccc_nnnn takes an existing section descriptor, _s_c_n, and returns a
  51.      section descriptor for the next higher section.  One may use a null _s_c_n
  52.      to obtain a section descriptor for the section whose index is 1 (skipping
  53.      the section whose index is _SSSS_HHHH_NNNN______UUUU_NNNN_DDDD_EEEE_FFFF).  If no further sections are
  54.      present or an error occurs, _eeee_llll_ffff______nnnn_eeee_xxxx_tttt_ssss_cccc_nnnn returns a null pointer.
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.                                                                         PPPPaaaaggggeeee 1111
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68. EEEELLLLFFFF____GGGGEEEETTTTSSSSCCCCNNNN((((3333EEEE))))                                                  EEEELLLLFFFF____GGGGEEEETTTTSSSSCCCCNNNN((((3333EEEE))))
  69.  
  70.  
  71.  
  72.      _eeee_llll_ffff______nnnn_dddd_xxxx_ssss_cccc_nnnn takes an existing section descriptor, _s_c_n, and returns its
  73.      section table index.  If _s_c_n is null or an error occurs, _eeee_llll_ffff______nnnn_dddd_xxxx_ssss_cccc_nnnn
  74.      returns _SSSS_HHHH_NNNN______UUUU_NNNN_DDDD_EEEE_FFFF.
  75.  
  76. EEEEXXXXAAAAMMMMPPPPLLLLEEEE
  77.      An example of sequential access appears below.  Each pass through the
  78.      loop processes the next section in the file; the loop terminates when all
  79.      sections have been processed.
  80.  
  81.           _ssss_cccc_nnnn _==== _0000_;;;;
  82.           _wwww_hhhh_iiii_llll_eeee _((((_((((_ssss_cccc_nnnn _==== _eeee_llll_ffff______nnnn_eeee_xxxx_tttt_ssss_cccc_nnnn_((((_eeee_llll_ffff_,,,, _ssss_cccc_nnnn_))))_)))) _!!!!_==== _0000_))))
  83.           _{{{{
  84.                   _////_**** _pppp_rrrr_oooo_cccc_eeee_ssss_ssss _ssss_eeee_cccc_tttt_iiii_oooo_nnnn _****_////
  85.           _}}}}
  86.  
  87. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  88.      _eeee_llll_ffff(3E), _eeee_llll_ffff______bbbb_eeee_gggg_iiii_nnnn(3E), _eeee_llll_ffff______ffff_llll_aaaa_gggg(3E), _eeee_llll_ffff______gggg_eeee_tttt_dddd_aaaa_tttt_aaaa(3E), _eeee_llll_ffff______gggg_eeee_tttt_eeee_hhhh_dddd_rrrr(3E),
  89.      _eeee_llll_ffff______gggg_eeee_tttt_ssss_hhhh_dddd_rrrr(3E).
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.                                                                         PPPPaaaaggggeeee 2222
  128.  
  129.  
  130.  
  131.